require("global.php");
require("text1.php");
//22-02-04
// added cat order_by
// added photoorder
// added thumbs in menu (tpath)
// added webmaster email check section
// altered _get & _post
$action=$_POST[action];
if(!$action) {$action=$_GET[action];}
$gll=$_POST[gll];
if(!$gll) {$gll=$_GET[gll];}
$maxp=$_POST[maxp];
if(!$maxp) {$maxp=$_GET[maxp];}
$vpic=$_POST[vpic];
if(!$vpic) {$vpic=$_GET[vpic];}
$tpic=$_POST[tpic];
if(!$tpic) {$tpic=$_GET[tpic];}
$picgal=$_POST[picgal];
if(!$picgal) {$picgal=$_GET[picgal];}
$wme=templates(webmasteremail);
if ($wme=='you@yourdomain.com') {
echo "Voordat je verder kunt, moet er een e-mailadres voor de beheerder worden ingevoerd!
Dit kun je doen door in te loggen en onder SETTINGS - ALGEMENE SETTINGS de gegevens in te voeren.";
die;
}
list($galleryname,$trcolor,$trtext,$alt1,$alt2,$ext)=special_get();
$num=$funk->num_vals("SELECT uid FROM $cats ORDER BY order_by");
$cpnum=sizeof($num);
if ($cpnum>"0") $cpnum--;
if ($cpnum>"0") {
for($x=0;$x<=$cpnum;$x++) {
$categ[$x+1]=$funk->db_query("SELECT cat_name FROM $cats WHERE uid = '$num[$x]'");
}
}
$myhtml->top_html($galleryname,$galleryname,"","");
if (!$action) {
$c=$funk->num_vals("SELECT * FROM $files ORDER BY uploadtime");
while(list($i,$v) = each($c)) {
$vis=$funk->db_query("SELECT uploadtime FROM $files WHERE uid = '$v'");
$gal=$funk->db_query("SELECT gallery FROM $files WHERE uid = '$v'");
}
$vis=date("d/m/y",$vis);
$galn=$funk->db_query("SELECT gallery_name FROM $gallery WHERE uid = '$gal'");
$galn=stripslashes($galn);
?>
"> echo $tx1." ".$galn." ".$vis; ?>
|
echo $tx13; ?> | echo $tx14; ?> |
if ($picgal!="") {
$c=$funk->num_vals("SELECT * FROM $gallery WHERE category='$picgal' ORDER BY order_by");}
else {$c=$funk->num_vals("SELECT * FROM $gallery ORDER BY order_by");}
while(list($i,$v) = each($c)) {
$gn=$funk->db_query("SELECT gallery_name FROM $gallery WHERE uid = '$v'");
$tpath=$funk->db_query("SELECT tpath FROM $gallery WHERE uid = '$v'");
$vis=$funk->db_query("SELECT visible FROM $gallery WHERE uid = '$v'");
$co=$funk->db_query("SELECT gallery_comment FROM $gallery WHERE uid = '$v'");
$gn=stripslashes($gn);
$co=stripslashes($co);
if ($vis=="1") {
echo "";
if ($tpath!="") {$tpath="";
echo $tpath." ";
}
echo"$gn |
$co | \n";
}
}
?>
} // end of action =""
elseif ($action=="view") {
$gn=$funk->db_query("SELECT gallery_name FROM $gallery WHERE uid = '$gll'");
$gn=stripslashes($gn);
?>
|
echo $gn;?> |
|
$twidth=templates(twidth);
$theight=templates(theight);
$s="SELECT * FROM $files WHERE gallery='$gll'";
$photoorder=templates(photoorder);
if ($photoorder=="0") {$s=$s." ORDER BY uid";}
if ($photoorder=="1") {$s=$s." ORDER BY file_name";}
if ($photoorder=="2") {$s=$s." ORDER BY file_name DESC";}
//$c=$funk->num_vals("SELECT * FROM $files WHERE gallery='$gll'");
$c=$funk->num_vals($s);
$pnum=sizeof($c);
if ($pnum=="0") {echo " $tx15";}
$tot=0;
$tpr=templates(tpr);
while(list($i,$v) = each($c)) {
if ($tot=="0") echo "";
$fln=$funk->db_query("SELECT file_name FROM $files WHERE uid='$v'");
$tpath=$funk->db_query("SELECT thumb_path FROM $gallery WHERE uid='$gll'");
if (!$tpath) {$fl="images/thumbs/".$fln;
} else {$fl=$tpath.$fln; }
if ($fln!="") {echo" | \n";}
else echo" | ";
$tot++;
if ($tot==$tpr) {echo " ";
$tot="0";}
}
?>
$c=$funk->num_vals("SELECT * FROM $comments WHERE gallery='$gll'");
while(list($i,$v) = each($c)) {
$nf=$funk->db_query("SELECT name_from FROM $comments WHERE uid = '$v'");
$comment=$funk->db_query("SELECT comment FROM $comments WHERE uid = '$v'");
$comment=stripslashes($comment);
$dt=$funk->db_query("SELECT date FROM $comments WHERE uid = '$v'");
$cdate=date("D d M Y @ H:i",$dt);
$outcomm=" From : ".$nf." (".$cdate.") ".$comment;
echo $outcomm."
\n";
}
?>
if (templates(allowcomment)=="yes") {
?>
echo $tx2; ?> [Terug naar de foto-index]
}
?>
|
} // end of 'view'
elseif ($action=="showfull") {
$fln=$funk->db_query("SELECT file_name FROM $files WHERE uid='$vpic'");
$comn=$funk->db_query("SELECT comment FROM $files WHERE uid='$vpic'");
$comn=stripslashes($comn);
$galn=stripslashes($funk->db_query("SELECT gallery_name FROM $gallery WHERE uid='$gll'"));
$c=$funk->num_vals("SELECT * FROM $files WHERE gallery='$gll' ORDER BY file_name");
while(list($i,$v) = each($c)) {
$t[$i]=$v;
}
$tpath=$funk->db_query("SELECT photo_path FROM $gallery WHERE uid='$gll'");
if (!$tpath) {$fl="images/photos/".$fln;
} else {$fl=$tpath.$fln; }
//$fl="images/photos/".$fln;
$nvpic=$t[($tpic+'1')];
$lvpic=$t[($tpic-'1')];
$ltpic=$tpic;
$ntpic=$tpic;
$ltpic--;
$ntpic++;
if ($tpic!="0") {$prev="$tx8";}
else {$prev=$tx8;}
if (($tpic+'1')<"$maxp") {$nexti="$tx9";}
else {$nexti=$tx9;}
?>
Foto echo ($tpic+'1'); ?> van echo $maxp; ?>
|
echo $galn; ?>
|
echo $tx10; ?>
|
echo $prev; ?>
|
|
echo $nexti; ?>
|
|
echo $comn; ?>
|
|
$c=$funk->num_vals("SELECT * FROM $photocomments WHERE photo='$vpic'");
while(list($i,$v) = each($c)) {
$nf=$funk->db_query("SELECT name_from FROM $photocomments WHERE uid = '$v'");
$comment=$funk->db_query("SELECT comment FROM $photocomments WHERE uid = '$v'");
$comment=stripslashes($comment);
$dt=$funk->db_query("SELECT date FROM $photocomments WHERE uid = '$v'");
$cdate=date("D d M Y @ H:i",$dt);
$outcomm=" From : ".$nf." (".$cdate.") ".$comment;
echo $outcomm."
\n";
}
$allowi=templates(allowi);
if ($allowi=="yes") {
?>
echo $tx2; ?>
}
?>
|
} // end of showfull
?>
|